package thread;

public class OutputThread extends Thread{
	Bank bank;
	public OutputThread(Bank bank){
		this.bank = bank;
	}
	@Override
	public void run(){
		synchronized(bank){
			for(int i=0;i<=100;i++){
				System.out.print("출금처리중");
				if(i%10==0)
					System.out.println();
			}
			bank.output(100);
			System.out.println("출금완료!(잔액:"+bank.money+")");
		}
	}
}
